package ${package.Service};
import ${package.Entity}.${entity};
import java.util.List;
import com.puruo.mindhall.bean.PageInfo;
import java.math.BigDecimal;

public interface ${table.serviceName}{
<#list table.fields as field>
<#if field.keyFlag>
    /**
    *  查询表${table.name}所有信息
    */
    List<${entity}> findAll();
</#if>
</#list>

<#list table.fields as field>
<#if field.keyFlag>
    /**
    * 查询表${table.name}信息
    */
    List<${entity}> getByEntity(${entity} ${table.entityPath});
</#if>
</#list>

<#list table.fields as field>
<#if field.keyFlag>
    /**
    * 查询表${table.name}信息
    */
    ${entity} getById(<#if field.propertyType == "BigDecimal">Long</#if><#if field.propertyType != "BigDecimal">${field.propertyType}</#if> ${field.propertyName});
</#if>
</#list>

<#list table.fields as field>
<#if field.keyFlag>
    /**
    * 删除表${table.name}信息
    */
    int deleteById(<#if field.propertyType == "BigDecimal">Long</#if><#if field.propertyType != "BigDecimal">${field.propertyType}</#if> ${field.propertyName});
</#if>
</#list>

<#list table.fields as field>
<#if field.keyFlag>
    /**
    * 更新表${table.name}信息
    */
    int updateBySelective(${entity} ${table.entityPath});
</#if>
</#list>

<#list table.fields as field>
<#if field.keyFlag>
    /**
    *  新增表${table.name}信息
    */
    int insertBySelective(${entity} ${table.entityPath});
</#if>
</#list>

<#list table.fields as field>
<#if field.keyFlag>
    /**
    *  ${table.name}分页查询
    */
    PageInfo<${entity}> getPage(${entity} ${table.entityPath});
</#if>
</#list>

}
